import { ref } from "vue";
// 全屏功能
export function fullScreenEvent() {
  // 是否全屏
  const isFullscreen = ref(false);

  // 全屏功能
  const changeFullscreen = () => {
    const docElement = document.documentElement;
    if (isFullscreen.value) {
      document.exitFullscreen();
    } else {
      docElement.requestFullscreen();
    }
    isFullscreen.value = !isFullscreen.value;
  };
  return { isFullscreen, changeFullscreen };
}
